import Loadable from 'react-loadable';
import { FC } from 'react';
// import Loading from './my-loading-component';
const Loading:FC = () => {
    return <div>加载中...</div>
}

const Index = Loadable({ loader: () => import('../views/Index'), loading: Loading, });
const Home = Loadable({ loader: () => import('../views/Index/Home'), loading: Loading, });
const Login = Loadable({ loader: () => import('../views/Login'), loading: Loading, });

const routes = [
    {
        from : '/',
        to : '/login'
    },
    {
        path : '/index',
        component:Index,
        children : [
            {
                from : '/index',
                to : '/index/login'
            },
            {
                path : '/index/home',
                component : Home
            },
            
        ]
    },
    {
        path : '/login',
        component : Login
    }
]

export default routes;